# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=ktextaddons
pkgver=1.3.1
pkgrel=1
pkgdesc='Various text handling addons'
arch=(x86_64)
license=(GPL)
url='https://invent.kde.org/libraries/ktextaddons'
depends=(kxmlgui qtkeychain-qt5 qt5-speech)
makedepends=(extra-cmake-modules doxygen qt5-tools)
optdepends=('languagetool: Grammar checking'
            'grammalecte: French grammar checking'
            'libreoffice: Use autocorrection data from LibreOffice')
source=(https://download.kde.org/stable/$pkgname/$pkgname-$pkgver.tar.xz)
sha256sums=('5c65b3bc2f74aa1a4eee4f5483b70f542145894e27a02b7da96f834f6ef1a70e')

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DBUILD_TESTING=OFF \
    -DBUILD_DESIGNERPLUGIN=ON \
    -DBUILD_QCH=ON
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
